\(\int \log ^2(c x) \, dx\) [11]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 6, antiderivative size = 19 \[ \int \log ^2(c x) \, dx=2 x-2 x \log (c x)+x \log ^2(c x) \]

[Out]

2*x-2*x*ln(c*x)+x*ln(c*x)^2

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2333, 2332} \[ \int \log ^2(c x) \, dx=x \log ^2(c x)-2 x \log (c x)+2 x \]

[In]

Int[Log[c*x]^2,x]

[Out]

2*x - 2*x*Log[c*x] + x*Log[c*x]^2

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2333

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rubi steps \begin{align*} \text {integral}& = x \log ^2(c x)-2 \int \log (c x) \, dx \\ & = 2 x-2 x \log (c x)+x \log ^2(c x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \log ^2(c x) \, dx=2 x-2 x \log (c x)+x \log ^2(c x) \]

[In]

Integrate[Log[c*x]^2,x]

[Out]

2*x - 2*x*Log[c*x] + x*Log[c*x]^2

Maple [A] (verified)

Time = 0.01 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.05

method result size
norman \(2 x -2 x \ln \left (x c \right )+x \ln \left (x c \right )^{2}\) \(20\)
risch \(2 x -2 x \ln \left (x c \right )+x \ln \left (x c \right )^{2}\) \(20\)
parallelrisch \(2 x -2 x \ln \left (x c \right )+x \ln \left (x c \right )^{2}\) \(20\)
derivativedivides \(\frac {x c \ln \left (x c \right )^{2}-2 x c \ln \left (x c \right )+2 x c}{c}\) \(27\)
default \(\frac {x c \ln \left (x c \right )^{2}-2 x c \ln \left (x c \right )+2 x c}{c}\) \(27\)

[In]

int(ln(x*c)^2,x,method=_RETURNVERBOSE)

[Out]

2*x-2*x*ln(x*c)+x*ln(x*c)^2

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \log ^2(c x) \, dx=x \log \left (c x\right )^{2} - 2 \, x \log \left (c x\right ) + 2 \, x \]

[In]

integrate(log(c*x)^2,x, algorithm="fricas")

[Out]

x*log(c*x)^2 - 2*x*log(c*x) + 2*x

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \log ^2(c x) \, dx=x \log {\left (c x \right )}^{2} - 2 x \log {\left (c x \right )} + 2 x \]

[In]

integrate(ln(c*x)**2,x)

[Out]

x*log(c*x)**2 - 2*x*log(c*x) + 2*x

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.84 \[ \int \log ^2(c x) \, dx={\left (\log \left (c x\right )^{2} - 2 \, \log \left (c x\right ) + 2\right )} x \]

[In]

integrate(log(c*x)^2,x, algorithm="maxima")

[Out]

(log(c*x)^2 - 2*log(c*x) + 2)*x

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \log ^2(c x) \, dx=x \log \left (c x\right )^{2} - 2 \, x \log \left (c x\right ) + 2 \, x \]

[In]

integrate(log(c*x)^2,x, algorithm="giac")

[Out]

x*log(c*x)^2 - 2*x*log(c*x) + 2*x

Mupad [B] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.84 \[ \int \log ^2(c x) \, dx=x\,\left ({\ln \left (c\,x\right )}^2-2\,\ln \left (c\,x\right )+2\right ) \]

[In]

int(log(c*x)^2,x)

[Out]

x*(log(c*x)^2 - 2*log(c*x) + 2)